﻿using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.ValueGeneration;
using System.Diagnostics.CodeAnalysis;

namespace EntityModels.Normal
{
    public class NowTimeValueGenerator : ValueGenerator<DateTime>
    {
        public override bool GeneratesTemporaryValues => true;

        public override DateTime Next([NotNull] EntityEntry entry)
        {
            return DateTime.Now;
        }

    }
}
